cmake_minimum_required(VERSION 2.6)
project(WoS)

if (WIN32)
add_definitions(-D__WIN32__)
add_definitions(-D_WIN32_WINNT=0x0501)
add_definitions(-D__LCC__)
add_definitions(-W3)
else()
message(FATAL_ERROR "Only support WIN32")
endif()

if (WIN32)
set(Boost_IncludeDir ${PROJECT_SOURCE_DIR}/Dependency/boost)
set(Libevent_IncludeDir ${PROJECT_SOURCE_DIR}/Dependency/libevent/include)
set(Libevent_LibraryDir ${PROJECT_SOURCE_DIR}/Dependency/libevent/lib)
set(Libevent_Libraries libevent libevent_core libevent_extras)
set(MySQL_IncludeDir ${PROJECT_SOURCE_DIR}/Dependency/mysql/include)
set(MySQL_LibraryDir ${PROJECT_SOURCE_DIR}/Dependency/mysql/lib)
set(MySQL_Libraries libmysql)
set(OpenSSL_IncludeDir ${PROJECT_SOURCE_DIR}/Dependency/openssl)
set(OpenSSL_LibraryDir ${PROJECT_SOURCE_DIR}/Dependency/openssl/lib)
set(OpenSSL_Libraries libeay32)
set(Zlib_IncludeDir ${PROJECT_SOURCE_DIR}/Dependency/zlib/include)
endif()

include_directories(
    ${Boost_IncludeDir}
    ${Libevent_IncludeDir}
    ${MySQL_IncludeDir}
    ${OpenSSL_IncludeDir}
    ${Zlib_IncludeDir}
)

link_directories(
    ${Libevent_LibraryDir}
    ${MySQL_LibraryDir}
    ${OpenSSL_LibraryDir}
)

add_subdirectory(Shared)
add_subdirectory(Dependency)
add_subdirectory(Realmd)
add_subdirectory(Game)